struct fdreturnList
{
	struct file_descriptor *fdescriptor;
	struct fdreturnList *next;
};

struct trie
{
   char *substr;
   struct trie *child;
   struct trie *sibling;
   int present_flag;
   struct fdreturnList *list;
};

struct trie *trieHead;
struct trie* newTrieNode();
struct fdreturnList* addtoList(struct fdreturnList *list, struct file_descriptor *fd);
void addWordInTrie(struct trie *t, char *str, struct file_descriptor *fd);
struct trie* currentLevel(struct trie *t, char c);
void findInTrie(struct trie *t, char *str);
void mountTries(struct file_descriptor_list* FDList, struct trie* t);
void printlist(struct fdreturnList* list);
